﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UcStandByDentist.ascx.cs" Inherits="includes_UcStandByDentist" %>
<script>

    //<![CDATA[
 
<%if (IsPostBack)
  {%>
    showWorking();
    //workingWin.close(); 
      <%} %>
    function <%=this.ClientID%>chkError()
    {
        arr= new Array(
        document.getElementById('<%=txtLName.ClientID%>'),

       <%if (this.fromPage != null && this.fromPage != "" && this.fromPage.ToString() == "RateDoctors")
         { %>
       document.getElementById('<%=ddlhospital.ClientID%>'),
       document.getElementById('<%=ddlInsurance.ClientID%>'),
       <%} %>
       document.getElementById('<%=ddlState.ClientID%>'),
        document.getElementById('<%=txtCity.ClientID%>'),
        document.getElementById('<%=txtZipCode.ClientID%>'),
        document.getElementById('<%=ddlSpeciality.ClientID%>'))
        count=0;        
        for(i=0;i<arr.length;i++)
        {
            if(trim(eval(arr[i]).value)!="0" && trim(eval(arr[i]).value)!="")
            {
                count++;
            }
        }
        if(count<2)
        {
            alert("Please select atleast 2 conditions for search");
            return false;  
        }
        if(chkMinLen(document.getElementById('<%=txtCity.ClientID%>'),3))           
           if(chkMinLen(document.getElementById('<%=txtZipCode.ClientID%>'),5))   
                                    
               if(chkMinLen(document.getElementById('<%=txtLName.ClientID%>'),1))
                   {
                       showWorking();
                       return true;
                   }
                   else
                       return false;
               else
                   return false;
           else
               return false;           
       else           
           return false;
           showWorking();
           return true;
       }

       //]]>
 
</script>
<%--<asp:UpdatePanel ID="UpdatePanel4" runat="server" UpdateMode="Conditional">
        <ContentTemplate>--%>
<table cellpadding="1" cellspacing="0" border="0" width="100%">


    <tr>
        <td class="bodytxt" style="width: 140px;">&nbsp;Major Specialty :<span class="red-text" style="color: #ff0000">*</span>
        </td>
        <td class="bodytxt" style="width: 10px;"></td>
        <td>
            <div class="styled-select" style="width: 120px">
                <asp:DropDownList CssClass="small-text" Width="140px" runat="server" ID="ddlSpeciality"></asp:DropDownList>
            </div>
        </td>
    </tr>
    <tr>
        <td class="bodytxt" nowrap="true">&nbsp;Country :</td>
        <td class="bodytxt" style="width: 10px;"></td>
        <td>
            <div class="styled-select" style="width: 120px">
                <asp:DropDownList Width="140px" runat="server"
                    ID="ddlCountry" OnSelectedIndexChanged="ddlCountry_SelectedIndexChanged"
                    AutoPostBack="True">
                </asp:DropDownList>
            </div>
        </td>
    </tr>
    <tr>
        <td class="bodytxt" style="width: 80px;">&nbsp;State/Province :</td>
        <td class="bodytxt" style="width: 10px;"></td>
        <td>
            <div class="styled-select" style="width: 120px">
                <asp:DropDownList ID="ddlState" runat="server" Width="140px" />
            </div>
        </td>
    </tr>
    <tr>
        <td class="bodytxt" style="width: 80px; height: 26px;">&nbsp;City :</td>
        <td class="bodytxt" style="width: 10px; height: 26px;"></td>
        <td style="height: 26px">
            <asp:TextBox ID="txtCity" runat="server" Width="120px"></asp:TextBox></td>
    </tr>
    <tr>
        <td class="bodytxt" colspan="3">&nbsp;OR</td>
    </tr>
    <tr>
        <td class="bodytxt" style="width: 80px; height: 26px;">&nbsp;Zip Code :</td>
        <td class="bodytxt" style="width: 10px; height: 26px;"></td>
        <td style="height: 26px">
            <asp:TextBox ID="txtZipCode" runat="server" Width="120px"></asp:TextBox></td>
    </tr>
    <tr>
        <td class="bodytxt" style="width: 83px;">&nbsp;Last Name :</td>
        <td class="bodytxt" style="width: 10px"></td>
        <td>
            <asp:TextBox ID="txtLName" runat="server" Width="120px"></asp:TextBox></td>
    </tr>
    <tr runat="server" id="tr_Hospital" visible="false">
        <td class="bodytxt" style="width: 80px; height: 26px;">&nbsp;Hospital :</td>
        <td class="bodytxt" style="height: 26px; width: 10px;"></td>
        <td style="height: 26px">
            <div class="styled-select" style="width: 120px">
                <asp:DropDownList ID="ddlhospital" runat="server" Width="140px" />
            </div>
        </td>
    </tr>
    <tr runat="server" id="tr_Insurance" visible="false">
        <td class="bodytxt" style="width: 80px; height: 26px;">&nbsp;Insurance :</td>
        <td class="bodytxt" style="height: 26px; width: 10px;"></td>
        <td style="height: 26px">
            <div class="styled-select" style="width: 120px">
                <asp:DropDownList ID="ddlInsurance" runat="server" Width="140px" />
            </div>
        </td>
    </tr>

    <tr>
        <td align="center" colspan="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
            <asp:Button ID="btnSubmit" runat="server" CssClass="buttonclass" Text="Submit" OnClick="btnSubmit_Click" /><br />
        </td>
    </tr>
</table>
<%--</ContentTemplate>
    </asp:UpdatePanel>--%>
<script>
    try{
        workingWin.close(); }catch(e){}
</script>
